<!-- 我的设置 -->
<template>
  <div class="contain">
    <ul class="list-set-wrap mt30">
      <router-link to="/user/set/aboutus" tag="li">关于我们<i class="iconfont icon-more"></i></router-link>
      <router-link to="/user/set/version" tag="li">版本信息<i class="iconfont icon-more"></i></router-link>
      <li @click="showPopupPicker=true;">字体大小设置<i class="iconfont icon-more"></i></li>
      <popup-picker :show.sync="showPopupPicker" :show-cell="false" :data="[['大','中','默认']]" v-model="value" @on-change="setFontSize"></popup-picker>
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {
      showPopupPicker:false,
      value:[]
    }
  },
  created(){
    document.title = '设置';
  },
  methods: {
    setFontSize(value1){
      var ft = value1[0];
      switch (ft){
        case '大':
          ft = 24+'px';
          break;
        case '中':
          ft = 20+'px';
          break;
        case '默认':
          ft = 14+'px';
          break;
      }
      document.body.style.fontSize = ft;
      localStorage.fontsize = ft;
    }
  }
}
</script>
